<template>
  <section>
    <!--start 面包屑-->
    <div class="location">
      <el-breadcrumb separator="/">
        <el-breadcrumb-item :to="{path:'/index'}">首页</el-breadcrumb-item>
        <el-breadcrumb-item>营销</el-breadcrumb-item>
        <el-breadcrumb-item>分销商品</el-breadcrumb-item>
      </el-breadcrumb>
    </div>
    <!--end 面包屑-->
    <!--start content-->
    <div class="goodsContent goodSupply">

      <!--新增弹框  start-->
      <div class="height-search">
        <transition name="fade">
          <div class="modal-backdrop" v-show="vue_addgoodsDistributSet_show"></div>
        </transition>
        <transition name="slideDown">
          <div class="height-s-con" v-show="vue_addgoodsDistributSet_show" ref="vue_dom_addModel">

            <div class="public-th clearfix employNum-heard" v-if="vue_row_selectCount2> 0">
              <em @click="vue_row_unselectAll2" class="el-icon-close"></em>
              <span class="selectSpan">已选择<i>{{vue_row_selectCount2}}</i>项</span>
            </div>

            <div class="employNum-heard" v-else>
              <h2 class="slideBtn fl">选择商品</h2>
              <div class="public-left clearfix fl">
                <div class="goods-input">
                  <input @keydown.enter="vue_queryByFullTextFields2" type="text" placeholder="请输入商品名称进行搜索" v-model="addGoodsDistributQb.fullTextFilterStr" />
                  <i @click="vue_queryByFullTextFields2"></i>
                </div>
              </div>
            </div>

            <!--table表格数据   start-->
            <div v-if="selectAll == false">
              <el-table ref="multipleTable2" @selection-change="vue_row_select2" :data="addGoodsData.list" tooltip-effect="dark" :max-height="vue_table_maxHeight2" style="width: 100%;">
                <el-table-column type="selection" width="100">
                </el-table-column>
                <el-table-column prop="goodImg" class-name="nonePadding" label-class-name="nonePadding" label="图片" width="80">
                  <template scope="scope">
                    <el-popover trigger="hover" placement="right-start">
                      <img class="hoverImg" :src="addGoodsData.list[scope.$index].goodsBigPic"/>
                      <div slot="reference" class="goodImg-Box">
                        <el-tag><img class="goodImg" style="z-index: 200;" :src="addGoodsData.list[scope.$index].goodsBigPic"></el-tag>
                      </div>
                    </el-popover>
                  </template>
                </el-table-column>
                <el-table-column prop="goodsNo" label="商品编码" class-name="hidde" width="150" show-overflow-tooltip></el-table-column>
                <el-table-column prop="goodsName" label="商品名称" class-name="hidde" width="400" show-overflow-tooltip></el-table-column>
                <el-table-column prop="goodsSkuValue" label="商品规格" show-overflow-tooltip class-name="hidde">
                </el-table-column>
              </el-table>
            </div>
            <div v-else="selectAll == true">
              <el-table ref="multipleTable3" @selection-change="vue_row_select3" :data="addGoodsNoPageData.list" tooltip-effect="dark" :max-height="vue_table_maxHeight2" style="width: 100%;">
                <el-table-column type="selection" width="100">
                </el-table-column>
                <el-table-column prop="goodImg" class-name="nonePadding" label-class-name="nonePadding" label="图片" width="80">
                  <template scope="scope">
                    <el-popover trigger="hover" placement="right-start">
                      <img class="hoverImg" :src="addGoodsNoPageData.list[scope.$index].goodsBigPic"/>
                      <div slot="reference" class="goodImg-Box">
                        <el-tag><img class="goodImg" style="z-index: 200;" :src="addGoodsNoPageData.list[scope.$index].goodsBigPic"></el-tag>
                      </div>
                    </el-popover>
                  </template>
                </el-table-column>
                <el-table-column prop="goodsNo" label="商品编码" class-name="hidde" width="150" show-overflow-tooltip></el-table-column>
                <el-table-column prop="goodsName" label="商品名称" class-name="hidde" width="400" show-overflow-tooltip></el-table-column>
                <el-table-column prop="goodsSkuValue" label="商品规格" show-overflow-tooltip class-name="hidde">
                </el-table-column>
              </el-table>
            </div>
            <!--table表格数据   end-->
            <!--分页  start-->
            <div class="block" v-if="selectAll == false || vue_row_selectCount2 == 0">
              <el-pagination
                @size-change="page_onPageSizeChange1"
                @current-change="page_onCurPageChange1"
                :current-page="parseInt(addGoodsData.pageTools.pageNo)"
                :page-sizes="addGoodsData.pageTools.pageSizeOptions"
                :page-size="parseInt(addGoodsData.pageTools.pageSize)"
                :total="parseInt(addGoodsData.pageTools.recordCount)"
                layout="total, prev, pager, next, sizes,jumper">
              </el-pagination>
            </div>
            <!--分页  end-->

            <div class="clickBtnStyle">
              <el-form ref="Form" label-width="80px">
                <el-form-item label-width="15px">
                  <el-button @click="vue_companyGoods_addOk"  :disabled="clickBtn"  type="primary">确定</el-button>
                  <el-button @click="vue_companyGoods_addCancel">取消</el-button>
                  <el-button @click="vue_select_all(addGoodsNoPageData.list)" type="text">选择所有商品</el-button>
                </el-form-item>
              </el-form>
            </div>

          </div>
        </transition>
      </div>
      <!--新增弹框  end-->


      <div class="public-th clearfix employNum-heard" v-if="vue_row_selectCount1>0">
        <em @click="vue_row_unselectAll1" class="el-icon-close"></em>
        <span class="selectSpan">已选择<i>{{vue_row_selectCount1}}</i>项</span>
        <b class="selectB">|</b>
        <span class="selectSpan" @click='vue_batchApply'><em class="iconfont">&#xe616;</em>删除</span>
      </div>
      <div class="employNum-heard" v-else>
        <div class="public-left clearfix fl">
          <div class="goods-input">
            <input @keydown.enter="vue_queryByFullTextFields1" type="text" placeholder="请输入商品名称/编码/规格" v-model="goodsDistributQb.fullTextFields"/>
            <i @click="vue_queryByFullTextFields1"></i>
          </div>
        </div>
        <el-button class="fr" type="primary" @click="vFun_addPurCompany_addBtn" style="margin-left: 10px">新增</el-button>
      </div>
      <!--头部  end-->
      <!--table表格数据   start-->
      <el-table ref="multipleTable" :data="goodsDistributSet.list" tooltip-effect="dark" :max-height="vue_table_maxHeight1" style="width: 100%;" @selection-change="vue_row_select1">
        <el-table-column type="selection" width="60"></el-table-column>
        <el-table-column prop="goodImg"label="商品图片" width="120">
          <template scope="scope">
            <el-popover trigger="hover" placement="right-start">
              <img class="hoverImg" :src="goodsDistributSet.list[scope.$index].goodsBigPic" />
              <div slot="reference" class="goodImg-Box">
                <el-tag>
                  <img class="goodImg" style="z-index: 200;" :src="goodsDistributSet.list[scope.$index].goodsBigPic">
                </el-tag>
              </div>
            </el-popover>
          </template>
        </el-table-column>
        <el-table-column prop="goodsNo" label="商品编码" class-name="hidde" width="150" show-overflow-tooltip></el-table-column>
        <el-table-column prop="goodsName" label="商品名称" class-name="hidde" width="400" show-overflow-tooltip></el-table-column>
        <el-table-column prop="goodsSkuValue" label="商品规格" show-overflow-tooltip class-name="hidde" width="300"></el-table-column>
        <el-table-column label="市场价" class-name="hidde">
          <template scope="scope">
              <span>{{Public.formatMoney(scope.row.goodsSalePrice,2)}}</span>
          </template>
        </el-table-column>
      </el-table>
      <!--table表格数据   end-->
      <!--分页  start-->
      <div class="block">
        <el-pagination
          @size-change="page_onPageSizeChange"
          @current-change="page_onCurPageChange"
          :current-page="parseInt(goodsDistributSet.pageTools.pageNo)"
          :page-sizes="goodsDistributSet.pageTools.pageSizeOptions"
          :page-size="parseInt(goodsDistributSet.pageTools.pageSize)"
          :total="parseInt(goodsDistributSet.pageTools.recordCount)"
          layout="total, prev, pager, next, sizes,jumper">
        </el-pagination>
      </div>
      <!--分页  end-->
    </div>
    <!--end content-->
  </section>
</template>

<script>
  export default {
    data() {
      return {
        selectAll:false,    //判断是分页还是未分页数据
        clickBtn:false,      //（点击）确认按钮后禁用按钮
        vue_table_maxHeight1:390,      //分销商品列表的table高度
        vue_table_maxHeight2:390,      //新增分销商品（弹框）的table高度
        vue_addgoodsDistributSet_show:false,      //新增分销商品（是否显示弹框）
        vue_row_selectCount1:0,       //分销商品列表（已选择的row数）
        vue_row_distributGoodsCodeStr1:"",      //分销商品（选中的row的数据）
        vue_row_selectCount2:0,  //可新增分销商品列表（已选择的row数）
        vue_row_addGoodsCodeStr2:"",  //可新增分销商品（选中的row的数据）
        //分销商品（列表数据)展示
        goodsDistributSet:{
          list:[],
          pageTools:{},
        },
        //(可新增)分销商品（列表数据）展示（分页）
        addGoodsData:{
          list:[],
          pageTools:{},
        },
        //(可新增)分销商品（列表数据）展示（不分页）
        addGoodsNoPageData:{
          list:[],
        },
        //分销商品列表（模糊查询）
        goodsDistributQb:{
          fullTextFields:"",
        },
        //新增分销商品（模糊查询）
        addGoodsDistributQb:{
          fullTextFilterStr:"",
        },
      }
    },

    methods: {
//--------------------------------------（新增）分销商品  start----------------------
      //（点击）选择所有商品
      vue_select_all(rows){
        this.selectAll = true;
        setTimeout(()=>{
          rows.forEach(row => {
           this.$refs.multipleTable3.toggleRowSelection(row);
          });
        },10);
      },

      //（新增）分销商品（分页）选择项（数据的拼接）
      vue_row_select2(val){
          this.vue_row_selectCount2 = "";
          this.vue_row_selectCount2 = val.length;
          this.vue_row_addGoodsCodeStr2 = "";
          val.forEach((item, index, arr) => {
            this.vue_row_addGoodsCodeStr2 += item.goodsCode + ",";
          });
          this.vue_row_addGoodsCodeStr2 = this.vue_row_addGoodsCodeStr2.substring(0, this.vue_row_addGoodsCodeStr2.length - 1);
      },

      //（新增）分销商品（不分页）选择项（数据的拼接）
      vue_row_select3(val){
          this.vue_row_selectCount2 = "";
          this.vue_row_selectCount2 = val.length;
          this.vue_row_addGoodsCodeStr2 = "";
          val.forEach((item, index, arr) => {
            this.vue_row_addGoodsCodeStr2 += item.goodsCode + ",";
          });
          this.vue_row_addGoodsCodeStr2 = this.vue_row_addGoodsCodeStr2.substring(0, this.vue_row_addGoodsCodeStr2.length - 1);
      },


      //（新增分销商品）取消选择row
      vue_row_unselectAll2() {
        if(!this.selectAll){
          this.$refs.multipleTable2.clearSelection();
        }else{
          this.$refs.multipleTable3.clearSelection();
          this.selectAll = false;
        }
        this.vue_row_addGoodsCodeStr2="";
        this.vue_row_selectCount2 = "";
      },

      //（点击）新增分销商品（确认按钮）
      vue_companyGoods_addOk(){
        console.log(this.vue_row_addGoodsCodeStr2)
        this.clickBtn=!this.clickBtn;
        this.axios({
          method:"POST",
          url:"/v3/sale/goodss/updateToBeAgented",
          data:{
            "goodsCode":this.vue_row_addGoodsCodeStr2,
          }
        }).then((res)=>{
          this.clickBtn=!this.clickBtn;
          this.vue_addgoodsDistributSet_show=false;
          this.vue_row_selectCount2 = "";
          this.vue_row_addGoodsCodeStr2="";
          if(!this.selectAll){
            this.$refs.multipleTable2.clearSelection();
          }else{
            this.$refs.multipleTable3.clearSelection();
            this.selectAll = false;
          }
          this.Public.openSuccess(this,"操作成功！");
          this.goodsDistributSet.pageTools.pageNo = 1;
          this.query_goodsDistributSet();
          this.query_addGoodsNoPageData();
          this.query_addGoodsData();
        }).catch((err)=>{
          this.selectAll = false;
          this.clickBtn=!this.clickBtn;
          this.Public.openError(this,err.response.data);
        })
      },

      //初始化（可新增）分销商品列表（不分页）
      query_addGoodsNoPageData(){
        this.axios({
          method:"POST",
          url:"/v3/sale/goodss/queryAllAgentGoods",
          data:{}
        }).then((res)=>{
          this.addGoodsNoPageData.list = res.data.list;
        }).catch((err)=>{
          this.Public.openError(this,err.response.data)
        })
      },

      //初始化（可新增）分销商品列表（分页）
      query_addGoodsData(){
        this.axios({
          method:"POST",
          url:"/v3/sale/goodss/queryNotToBeAgentGoodsByPage",
          data:{
            "offset":(this.addGoodsData.pageTools.pageNo-1)*this.addGoodsData.pageTools.pageSize,
            "limit":this.addGoodsData.pageTools.pageSize,
            "fullTextFilterStr":this.addGoodsDistributQb.fullTextFilterStr,
          }
        }).then((res)=>{
          this.addGoodsData.list = res.data.list;
          this.addGoodsData.pageTools = res.data.pageTools;
          this.addGoodsData.sumInfo = res.data.sumInfo;
          this.addGoodsData.pageTools.pageSizeOptions = JSON.parse(this.addGoodsData.pageTools.pageSizeOptions);
        }).catch((err)=>{
          this.Public.openError(this,err.response.data)
        })
      },

      //（点击）新增分销商品（取消按钮）
      vue_companyGoods_addCancel(){
        this.vue_addgoodsDistributSet_show=false;
        if(!this.selectAll){
          this.$refs.multipleTable2.clearSelection();
        }else{
          this.$refs.multipleTable3.clearSelection();
          this.selectAll = false;
        }
        this.vue_row_addGoodsCodeStr2 = "";
        this.vue_row_selectCount2 = "";
      },

      //（新增分销商品）的（模糊查询）
      vue_queryByFullTextFields2(){
        this.addGoodsData.pageTools.pageNo = 1;
        this.query_addGoodsData();
      },

      //（新增分销商品）分页选项
      page_onPageSizeChange1(val) {
        this.addGoodsData.pageTools.pageSize = val;
        this.query_addGoodsData();
      },

      //（新增分销商品）分页选当前页
      page_onCurPageChange1(val) {
        this.addGoodsData.pageTools.pageNo = val;
        this.query_addGoodsData();
      },
//--------------------------------------（新增）分销商品  end------------------------

//--------------------------------------分销商品列表  start--------------------------

      //(点击新增按钮)分销商品列表页面
      vFun_addPurCompany_addBtn(){
        this.vue_addgoodsDistributSet_show=true;  //显示（可新增）分销商品列表
        this.query_addGoodsData();  //（可新增）分销商品列表（初始化）
      },

      //分销商品（批量删除）
      vue_batchApply() {
        const h = this.$createElement;
        this.$msgbox({
          title: '确认',
          message: h('div', {
            style: 'padding:20px;'
          }, [
            h('p', {
              style: 'text-align: center;font-size: 16px;color: #415161;text-align: center;line-height: 24px;margin-bottom: 8px;'
            }, '是否确认删除商品？'),
          ], ),
          customClass: "surePay clearfixBox",
          cancelButtonClass: 'fr',
          confirmButtonClass: 'fr',
          showCancelButton: true,
          confirmButtonText: '确定',
          cancelButtonText: '取消',
        }).then(action => {
          if(action === 'confirm') {
            this.axios({
              method: 'post',
              url: "/v3/sale/goodss/updateToBeUnAgented",
              data:{
                  "goodsCode":this.vue_row_distributGoodsCodeStr1,
              },
            }).then((res) => {
              this.Public.openSuccess(this,"操作成功！");
              this.goodsDistributSet.pageTools.pageNo = 1;
              this.query_goodsDistributSet();
            }).catch((err)=>{
              this.Public.openError(this,err.response.data)
            });
          }
        });
      },

      //分销商品选择项（数据的拼接）
      vue_row_select1(val){
        this.vue_row_selectCount1=val.length;
        this.vue_row_distributGoodsCodeStr1="";
        val.forEach((item,index,arr)=>{
          this.vue_row_distributGoodsCodeStr1+=item.goodsCode+",";
        })
        this.vue_row_distributGoodsCodeStr1 = this.vue_row_distributGoodsCodeStr1.substring(0,this.vue_row_distributGoodsCodeStr1.length-1);
      },

      //分销商品（取消选择row）
      vue_row_unselectAll1() {
        this.$refs.multipleTable.clearSelection();
        this.vue_row_distributGoodsCodeStr1="";
      },

      //（初始化）分销商品列表
      query_goodsDistributSet(){
        this.axios({
          method:"POST",
          url:"/v3/sale/goodss/queryAgentGoodsByPage",
          data:{
            "offset":(this.goodsDistributSet.pageTools.pageNo-1)*this.goodsDistributSet.pageTools.pageSize,
            "limit":this.goodsDistributSet.pageTools.pageSize,
            "fullTextFilterStr":this.goodsDistributQb.fullTextFields,
          }
        }).then((res)=>{
          this.goodsDistributSet.list = res.data.list;
          this.goodsDistributSet.pageTools = res.data.pageTools;
          this.goodsDistributSet.sumInfo = res.data.sumInfo;
          this.goodsDistributSet.pageTools.pageSizeOptions = JSON.parse(this.goodsDistributSet.pageTools.pageSizeOptions);
        }).catch((err)=>{
          this.openError(this,err.response.data)
        })
      },

      //分销商品（模糊搜索）
      vue_queryByFullTextFields1(){
        this.goodsDistributSet.pageTools.pageNo = 1;
        this.query_goodsDistributSet();
      },

      //（分销商品列表）分页选项
      page_onPageSizeChange(val) {
        this.goodsDistributSet.pageTools.pageSize = val;
        this.query_goodsDistributSet();
      },

      //（分销商品列表）分页选当前页
      page_onCurPageChange(val) {
        this.goodsDistributSet.pageTools.pageNo = val;
        this.query_goodsDistributSet();
      },

//--------------------------------------分销商品列表  end--------------------------
    },
    created() {
      this.goodsDistributSet.pageTools = this.$store.state.page;  //初始化分销商品列表pageTools
      this.query_goodsDistributSet();  //获取分销商品列表
      this.addGoodsData.pageTools = this.$store.state.page;  //初始化新增分销商品列表pageTools
      this.query_addGoodsNoPageData();   //初始化新增分销商品列表不分页数据
    },

    mounted() {
      this.vue_table_maxHeight1 = document.documentElement.clientHeight-303;
      this.vue_table_maxHeight2 = document.documentElement.clientHeight-258;
      this.$refs['vue_dom_addModel'].style.height = document.documentElement.clientHeight-100 +'px';
      document.querySelector(".goodsContent").style.height = (document.documentElement.clientHeight - 180) + 'px';
    }
  }
</script>

<style scoped>

  .clickBtnStyle{
    clear: both;
    margin-top: 10px;
  }

  .goodImg:hover {
    cursor: pointer;
  }

  .hoverImg {
    width: 190px;
    height: 190px;
    margin: 15px;
    background: white;
    z-index: 23;
  }

  .goTo:hover {
    color: #13c19f;
    cursor: pointer;
  }
  /* start 部门下拉的样式 */

  .departmentSelectDiv {
    position: relative;
    width: 100%;
    height: 36px;
    line-height: 36px;
  }

  .departmentSelectDiv>span {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 36px;
    border: 1px solid rgb(191, 212, 217);
    border-radius: 4px;
    font-size: 12px;
    padding-left: 10px;
    cursor: pointer;
  }

  .departmentSelectDiv>span:hover {
    border-color: rgb(131, 156, 165);
  }

  .departmentSelectDiv>span:active {
    border-color: #03b8cc;
  }

  .departmentSelectDiv>span:visited {
    border-color: #03b8cc;
  }

  .departmentSelectDiv>span:focus {
    border-color: #03b8cc;
  }

  .departmentSelectDiv>i {
    position: absolute;
    top: 0;
    right: 0;
    width: 35px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    color: rgb(191, 212, 217);
    transition: .3s;
    font-size: 12px;
  }

  .departmentSelectDiv>i.up {
    transform: rotate(180deg);
  }

  .departmentTree {
    position: absolute;
    width: 100%;
    top: 42px;
    left: 0;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
    z-index: 2;
    font-size: 12px;
    overflow-y: auto;
    height: 200px;
  }

  .selectSlide-enter-active,
  .selectSlide-leave-active {
    transition: .4s;
  }

  .selectSlide-enter,
  .selectSlide-leave-active {
    height: 0;
    opacity: 0;
  }
  /* end 部门下拉的样式 */

  .el-form {
    overflow: hidden;
  }

  .el-form .el-form-item:last-child {
    width: 100%;
  }

  .el-form-item {
    width: 485px;
    float: left;
    margin-right: 10px;
  }

  .search-title {
    font-size: 16px;
    border: 0;
    color: #415161;
    margin-bottom: 20px;
  }

  .modal-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    background-color: rgba(240, 240, 240, 0.2);
  }

  .height-s-con {
    position: absolute;
    width: 100%;
    /* height: 380px;*/
    top: 0;
    left: 0;
    padding: 20px;
    z-index: 1005;
    background: #fff;
    box-sizing: border-box;
    box-shadow: 0 0 10px #ccc;
    overflow: hidden;
  }

  .fade-enter-active,
  .fade-leave-active {
    transition: .4s;
  }

  .fade-enter,
  .fade-leave-active {
    opacity: 0;
  }

  .slideDown-enter-active,
  .slideDown-leave-active {
    transition: .4s;
  }

  .slideDown-enter,
  .slideDown-leave-active {
    height: 0;
    opacity: 0;
  }

  .selectSpan {
    display: block;
    float: left;
    line-height: 37px;
    color: #7b8aa1;
    padding-right: 24px;
  }

  .selectSpan:hover {
    cursor: pointer;
    color: #13c19f;
  }

  .selectSpan em {
    display: inline-block;
    vertical-align: middle;
    margin-top: -3px;
    margin-right: 3px;
  }

  .selectSpan i {
    color: #13c19f;
    margin: 0px 6px;
  }

  .selectB {
    float: left;
    line-height: 37px;
    display: block;
    margin: 0px 30px;
    color: #7b8aa1;
  }

  .el-icon-close {
    font-size: 12px !important;
    display: block;
    float: left;
    line-height: 37px;
    color: #7b8aa1;
    margin-right: 20px;
  }

  .el-icon-close:hover {
    cursor: pointer;
    color: #13c19f;
  }

  .block {
    float: right;
    margin-top: 10px;
  }

  .el-table {
    font-size: 12px;
  }

  p.kael {
    width: 1000px;
    color: red;
  }

  .p {
    text-indent: 10px;
    line-height: 30px;
    cursor: pointer;
  }

  .p em {
    position: relative;
    top: 0px;
    margin-right: 3px;
  }

  .p:hover {
    cursor: pointer;
    background: #eef1f9;
    color: #03B8CC;
  }

  .goodImg {
    width: 40px;
    height: 40px;
    margin: 8px 6px 8px 4px;
  }

  .high_search {
    line-height: 36px;
    color: #93a6b7;
    margin-left: 20px;
    cursor: pointer;
  }

  .high_search:hover {
    color: #13C19F;
  }

  .goods-input i {
    background: url(../../../img/sousuo.png) no-repeat;
    height: 20px;
    width: 20px;
    display: inline-block;
    position: relative;
    top: 5px;
    right: 5px;
    cursor: pointer;
  }

  .goods-input:hover {
    border-color: #13C19F;
    transition: 1s;
  }

  .goods-input {
    float: left;
    width: 340px;
    border: 1px solid #cdd9e6;
    border-radius: 4px;
    margin-right: 10px;
    height: 34px;
    cursor: pointer;
  }

  .goods-input input {
    display: block;
    float: left;
    width: 290px;
    height: 32px;
    font-size: 12px;
    border: 0;
    margin-left: 20px;
  }

  .slideBtn {
    line-height: 36px;
    margin-right: 26px;
  }

  .slideBtn div span {
    cursor: pointer;
    display: block;
  }

  .slideBtn div {
    font-size: 12px;
  }

  .slideBtnIcon {
    transition: .4s;
  }

  .slideBtnIcon.up {
    transform: rotate(-180deg);
  }

  .employNum-heard {
    height:34px;
    padding-top: 0px;
    overflow: hidden;
    margin-bottom: 10px;
    padding-left: 16px;
  }

  * {
    transition: .2s;
    box-sizing: border-box;
  }

  section {
    display: flex;
    flex-direction: column;
    flex: 1;
  }

  div.location {
    flex: 0 0 10px;
    padding: 3px 0 15px 0;
  }

  div.goodsContent {
    position: relative;
    flex: 1;
    width: 100%;
    background-color: #fff;
    padding: 20px 20px 20px 20px;
  }
  /* start 商品分类下拉的样式 */

  .departmentSelectDiv {
    position: relative;
    width: 100%;
    height: 36px;
    line-height: 36px;
  }

  .departmentSelectDiv>span {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 36px;
    border: 1px solid rgb(191, 212, 217);
    border-radius: 4px;
    font-size: 12px;
    padding-left: 10px;
    cursor: pointer;
  }

  .departmentSelectDiv>span:hover {
    border-color: rgb(131, 156, 165);
  }

  .departmentSelectDiv>span:active {
    border-color: #03b8cc;
  }

  .departmentSelectDiv>span:visited {
    border-color: #03b8cc;
  }

  .departmentSelectDiv>span:focus {
    border-color: #03b8cc;
  }

  .departmentSelectDiv>i {
    position: absolute;
    top: 0;
    right: 0;
    width: 35px;
    height: 36px;
    line-height: 38px;
    text-align: center;
    color: rgb(191, 212, 217);
    transition: .3s;
    font-size: 12px;
  }

  .departmentSelectDiv>i.up {
    transform: rotate(180deg);
  }

  .departmentTree {
    position: absolute;
    width: 100%;
    top: 42px;
    left: 0;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
    z-index: 2;
    font-size: 12px;
    overflow-y: auto;
    height: 200px;
  }

  .selectSlide-enter-active,
  .selectSlide-leave-active {
    transition: .4s;
  }

  .selectSlide-enter,
  .selectSlide-leave-active {
    height: 0;
    opacity: 0;
  }
  /* end 商品分类下拉的样式 */

  * {
    box-sizing: border-box;
    transition: .2s;
  }

  .piliangCao {
    margin-left: -6px;
    height: 45px;
    line-height: 36px;
  }

  .piliangCao em {
    font-size: 14px;
  }

  .piliangCao a {
    cursor: pointer;
    color: #768696;
    margin-right: 20px;
  }

  .piliangCao a:hover {
    color: #03B8CC;
  }

  .goodInput {
    width: 100px;
    height: 32px;
    border: 1px solid #cdd9e6;
    border-radius: 4px;
    text-indent: 10px;
  }

  .supply-top {
    height: 65px;
    line-height: 62px;
    border-bottom: 1px solid #ececec;
    margin-bottom: 12px;
  }

  .supply-top .fenge {
    font-size: 12px;
    margin: 0 15px;
    color: #ececec;
  }

  .slideBtn {
    font-weight: normal;
  }
</style>
